home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
HAM Radio 1997
/
HAM Radio 1997.iso
/
vcls
/
wfc007.000
/
include
/
cnetconn.hpp
< prev
next >
Wrap
C/C++ Source or Header
|
1996-04-08
|
2KB
|
78 lines
#if ! defined( NETWORK_CONNECTION_CLASS_HEADER )
/*
** Author: Samuel R. Blackburn
** CI$: 76300,326
** Internet: sammy@sed.csc.com
**
** You can use it any way you like.
*/
#define NETWORK_CONNECTION_CLASS_HEADER
class CNetworkConnectionInformation : public CObject
{
DECLARE_SERIAL( CNetworkConnectionInformation )
private:
void m_Initialize( void );
public:
CNetworkConnectionInformation();
CNetworkConnectionInformation( CONNECTION_INFO_1 *information_p );
virtual ~CNetworkConnectionInformation();
DWORD ID;
DWORD Type;
DWORD NumberOfUsers;
DWORD NumberOfOpens;
DWORD Time;
CString UserName;
CString NetName;
virtual void Copy( CONNECTION_INFO_1 *source );
virtual void Empty( void );
virtual void Serialize( CArchive& archive );
};
class CNetworkConnections : public CNetwork
{
DECLARE_SERIAL( CNetworkConnections )
private:
void m_Initialize( void );
protected:
/*
** Connection information variables
*/
CONNECTION_INFO_1 *m_1InformationBuffer;
/*
** File Information enumeration variables
*/
DWORD m_1ResumeHandle;
DWORD m_1CurrentEntryNumber;
DWORD m_1NumberOfEntriesRead;
DWORD m_1TotalNumberOfEntries;
public:
CNetworkConnections();
CNetworkConnections( LPCTSTR machine_name );
virtual ~CNetworkConnections();
virtual void Close( void );
virtual BOOL Enumerate( LPCTSTR share_or_computer_name );
virtual BOOL GetNext( CNetworkConnectionInformation& information );
virtual void Serialize( CArchive& archive );
};
#endif // NETWORK_CONNECTION_CLASS_HEADER